package com.yegrina.member.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;

import com.yegrina.member.domain.Member;

public class MemberDaoImpl extends SqlSessionDaoSupport implements MemberDao{

	public List<Member> getMemberList(Map<String, Object> map) {
		
		List<Member> list = 
				getSqlSession().selectList("getMemberList",map);
		
		return list;
	}

	public int getMemberCount() {
		Integer count = getSqlSession().selectOne("getMemberCount");
		return count;
	}

	public void insertMember(Member member) {
		getSqlSession().insert("insertMember",member);
	}
	
	public String getPasswd(String userid){
		
		return getSqlSession().selectOne("getPasswd",userid);
	}
	
	public Member getMember(String userid) {
		Member member = 
				getSqlSession().selectOne("getMember",userid);
		return member;
	}

	public void updateMember(Member member) {
		getSqlSession().update("updateMember",member);
	}

	public void deleteMember(String userid) {
		getSqlSession().delete("deleteMember",userid);
	}

	public void updateUserImage(Member member) {
		getSqlSession().update("updateUserImage",member);
		
	}
}




